package test;
import java.util.Random;

import divination.yijing.*;

public class test8Gua {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Random rd = new Random();
		// Test the Yao
		//testYao(6);
		// Test Trigram
		//testTrigram(rd);
		// Test Hexagram
		//testHexagram(rd);
		// Test DivinationCoins
		testDivinationCoins(rd);
	}

	public static void testYao(int n){
		Yao y1 = new Yao();
		for (int i=0;i<n;i++){
			y1.renew();
			System.out.println(i+" "+y1.toString());			
		}
	}
	
	public static void testTrigram(Random rd){
		Trigram t1 = new Trigram();
		t1.renew(rd);
		System.out.println(t1.getFullName());
		System.out.println(t1.toString());
		for (int i=0;i<8;i++){
			t1.setGua(i);
			System.out.println(t1.getFullName());
			System.out.println(t1.toString());
		}
	}
	
	public static void testHexagram(Random rd){
		Hexagram h1 = new Hexagram();
		h1.renew(rd);
		System.out.println(h1.getName());
		System.out.println(h1.toString());
		System.out.println(h1.getClassicInterpretation());
		System.out.println(h1.getModernInterpretation());
/*
  		for (int i=0;i<2;i++){
			h1.setGua(62+i);
			System.out.println(h1.getName());
			System.out.println(h1.toString());
		}
*/
	}
	
    public static void testDivinationCoins(Random rd){
    	//
    	DivinationCoins d1 = new DivinationCoins(rd);
    	//
    	System.out.println(d1.original.getName());
    	System.out.println(d1.original.toString());
		System.out.println(d1.original.getClassicInterpretation());
		System.out.println(d1.original.getModernInterpretation());
		System.out.println(d1.varied.getName());
		System.out.println(d1.varied.toString());
		System.out.println(d1.varied.getClassicInterpretation());
		System.out.println(d1.varied.getModernInterpretation());
    }

}
